﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text;

namespace FDStudio.Core.Entities.Query
{
    /*
     CreatedOn: 2018-01-30
     CreatedBy: Jackie Lee(天宇遊龍)
     */
    /// <summary>
    /// 查询排序
    /// </summary>
    public interface IQueryOrder<T> where T : class
    {
        /// <summary>
        /// 升序
        /// </summary>
        /// <typeparam name="Q"></typeparam>
        /// <param name="orderBy"></param>
        /// <returns></returns>
        QueryOrder<T> OrderBy<Q>(Expression<Func<T, Q>> orderBy);

        /// <summary>
        /// 降序
        /// </summary>
        /// <typeparam name="Q"></typeparam>
        /// <param name="orderBy"></param>
        /// <returns></returns>
        QueryOrder<T> OrderByDescending<Q>(Expression<Func<T, Q>> orderBy);

        /// <summary>
        /// 排序结果
        /// </summary>
        /// <returns></returns>
        string Result { get; }

        /// <summary>
        /// 关键字排序方式
        /// </summary>
        SortBy KeySortBy { get; }
    }
}
